package com.wpd.bo;
import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.common.util.StringUtil;

/**
 *
 *  @author : 自动生成
 *  @date   : 2017年07月14日 10:18:15
 *  @desc   : WpdOrder实体类
 */
public class WpdOrder implements Serializable{
    private static final long serialVersionUID = 1L;
	
	//主键
	private Integer guid ;

	//工单编号
	private String orderNo ;

	//申请人主键
	private Integer applicantGuid ;

	//申请人姓名
	private String applicantName ;

	//
	private Integer enterGuid ;

	//
	private String enterName ;

	//申请标题
	private String applyTitle ;
		
	//申请内容
	private String applyContent ;

	//申请时间
	private Date applyTime ;

	//审批人主键
	private Integer approverGuid ;

	//审批人姓名
	private String approverName ;

	//审批意见
	private String approvalOpinion ;

	//审批通过标志位
	private Integer approvalFlag ;

	//审批时间
	private Date approvalTime ;

	//派遣人主键
	private Integer senderGuid ;

	//派遣人姓名
	private String senderName ;

	//派遣标志位
	private Integer sendFlag ;

	//派遣时间
	private Date sendTime ;

	//派遣备注
	private String sendRemark ;

	//执行人主键
	private Integer executorGuid ;

	//执行人姓名
	private String executorName ;

	//执行标志位
	private Integer executeFlag ;

	//执行结果
	private String executeResult ;

	//执行结束时间
	private Date executeStartTime ;
		
	//执行结束时间
	private Date executeEndTime ;

	//评分
	private Integer score ;

	//评价
	private String evaluate ;
	
	//状态码
	private Integer state ;
	
	//预计修复时间
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	private Date exceptRepairTime ;
	
	private Long exceptRepairTimeStr ;

	public WpdOrder() {
		super();
	}

	public WpdOrder(Integer guid) {
		super();
		this.guid = guid;
 	}

	/**
	 *  设置主键
	 */
	public void setGuid(Integer guid) {
		this.guid = guid;
	}

	/**
	 *  获取主键
	 */
	public Integer getGuid() {
		return  this.guid;
	}

	/**
	 *  设置工单编号
	 */
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	/**
	 *  获取工单编号
	 */
	public String getOrderNo() {
		return  this.orderNo;
	}

	/**
	 *  设置申请人主键
	 */
	public void setApplicantGuid(Integer applicantGuid) {
		this.applicantGuid = applicantGuid;
	}

	/**
	 *  获取申请人主键
	 */
	public Integer getApplicantGuid() {
		return  this.applicantGuid;
	}

	/**
	 *  设置申请人姓名
	 */
	public void setApplicantName(String applicantName) {
		this.applicantName = applicantName;
	}

	/**
	 *  获取申请人姓名
	 */
	public String getApplicantName() {
		return  this.applicantName;
	}

	/**
	 *  设置
	 */
	public void setEnterGuid(Integer enterGuid) {
		this.enterGuid = enterGuid;
	}

	/**
	 *  获取
	 */
	public Integer getEnterGuid() {
		return  this.enterGuid;
	}

	/**
	 *  设置
	 */
	public void setEnterName(String enterName) {
		this.enterName = enterName;
	}

	/**
	 *  获取
	 */
	public String getEnterName() {
		return  this.enterName;
	}

	public String getApplyTitle() {
		return applyTitle;
	}

	public void setApplyTitle(String applyTitle) {
		this.applyTitle = applyTitle;
	}

	/**
	 *  设置申请内容
	 */
	public void setApplyContent(String applyContent) {
		this.applyContent = applyContent;
	}

	/**
	 *  获取申请内容
	 */
	public String getApplyContent() {
		return  this.applyContent;
	}

	/**
	 *  设置申请时间
	 */
	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	/**
	 *  获取申请时间
	 */
	public Date getApplyTime() {
		return  this.applyTime;
	}

	/**
	 *  设置审批人主键
	 */
	public void setApproverGuid(Integer approverGuid) {
		this.approverGuid = approverGuid;
	}

	/**
	 *  获取审批人主键
	 */
	public Integer getApproverGuid() {
		return  this.approverGuid;
	}

	/**
	 *  设置审批人姓名
	 */
	public void setApproverName(String approverName) {
		this.approverName = approverName;
	}

	/**
	 *  获取审批人姓名
	 */
	public String getApproverName() {
		return  this.approverName;
	}

	/**
	 *  设置审批意见
	 */
	public void setApprovalOpinion(String approvalOpinion) {
		this.approvalOpinion = approvalOpinion;
	}

	/**
	 *  获取审批意见
	 */
	public String getApprovalOpinion() {
		return  this.approvalOpinion;
	}

	/**
	 *  设置审批通过标志位
	 */
	public void setApprovalFlag(Integer approvalFlag) {
		this.approvalFlag = approvalFlag;
	}

	/**
	 *  获取审批通过标志位
	 */
	public Integer getApprovalFlag() {
		return  this.approvalFlag;
	}

	/**
	 *  设置审批时间
	 */
	public void setApprovalTime(Date approvalTime) {
		this.approvalTime = approvalTime;
	}

	/**
	 *  获取审批时间
	 */
	public Date getApprovalTime() {
		return  this.approvalTime;
	}

	/**
	 *  设置派遣人主键
	 */
	public void setSenderGuid(Integer senderGuid) {
		this.senderGuid = senderGuid;
	}

	/**
	 *  获取派遣人主键
	 */
	public Integer getSenderGuid() {
		return  this.senderGuid;
	}

	/**
	 *  设置派遣人姓名
	 */
	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}

	/**
	 *  获取派遣人姓名
	 */
	public String getSenderName() {
		return  this.senderName;
	}

	/**
	 *  设置派遣标志位
	 */
	public void setSendFlag(Integer sendFlag) {
		this.sendFlag = sendFlag;
	}

	/**
	 *  获取派遣标志位
	 */
	public Integer getSendFlag() {
		return  this.sendFlag;
	}

	/**
	 *  设置派遣时间
	 */
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	/**
	 *  获取派遣时间
	 */
	public Date getSendTime() {
		return  this.sendTime;
	}

	/**
	 *  设置派遣备注
	 */
	public void setSendRemark(String sendRemark) {
		this.sendRemark = sendRemark;
	}

	/**
	 *  获取派遣备注
	 */
	public String getSendRemark() {
		return  this.sendRemark;
	}

	/**
	 *  设置执行人主键
	 */
	public void setExecutorGuid(Integer executorGuid) {
		this.executorGuid = executorGuid;
	}

	/**
	 *  获取执行人主键
	 */
	public Integer getExecutorGuid() {
		return  this.executorGuid;
	}

	/**
	 *  设置执行人姓名
	 */
	public void setExecutorName(String executorName) {
		this.executorName = executorName;
	}

	/**
	 *  获取执行人姓名
	 */
	public String getExecutorName() {
		return  this.executorName;
	}

	/**
	 *  设置执行标志位
	 */
	public void setExecuteFlag(Integer executeFlag) {
		this.executeFlag = executeFlag;
	}

	/**
	 *  获取执行标志位
	 */
	public Integer getExecuteFlag() {
		return  this.executeFlag;
	}

	/**
	 *  设置执行结果
	 */
	public void setExecuteResult(String executeResult) {
		this.executeResult = executeResult;
	}

	/**
	 *  获取执行结果
	 */
	public String getExecuteResult() {
		return  this.executeResult;
	}

	public Date getExecuteStartTime() {
		return executeStartTime;
	}

	public void setExecuteStartTime(Date executeStartTime) {
		this.executeStartTime = executeStartTime;
	}

	/**
	 *  设置执行结束时间
	 */
	public void setExecuteEndTime(Date executeEndTime) {
		this.executeEndTime = executeEndTime;
	}

	/**
	 *  获取执行结束时间
	 */
	public Date getExecuteEndTime() {
		return  this.executeEndTime;
	}

	/**
	 *  设置评分
	 */
	public void setScore(Integer score) {
		this.score = score;
	}

	/**
	 *  获取评分
	 */
	public Integer getScore() {
		return  this.score;
	}

	/**
	 *  设置评价
	 */
	public void setEvaluate(String evaluate) {
		this.evaluate = evaluate;
	}

	/**
	 *  获取评价
	 */
	public String getEvaluate() {
		return  this.evaluate;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getExceptRepairTime() {
		return exceptRepairTime;
	}

	public void setExceptRepairTime(Date exceptRepairTime) {
		this.exceptRepairTime = exceptRepairTime;
	}
	
	public Object getOverTimeFlag(){
		if(StringUtil.isEmpty(executeEndTime) && !StringUtil.isEmpty(exceptRepairTime)){
			if(new Date().getTime() > exceptRepairTime.getTime()){
				return 1;
			}else{
				return 0;
			}
		}else{
			return 0;
		}
	}

	public Long getExceptRepairTimeStr() {
		return exceptRepairTimeStr;
	}

	public void setExceptRepairTimeStr(Long exceptRepairTimeStr) {
		this.exceptRepairTimeStr = exceptRepairTimeStr;
	}

}
